package com.eu.ebpm.engine.entity.runtime;

import com.eu.ebpm.engine.express.VariableType;
import com.eu.ebpm.engine.util.JdkObjectSerializableUtils;

/**
 * 流程参数
 * 	@存在与整个流程中,可以在任何流程环节中使用,当流程执行结束时,
 		将流程参数存入到wf_hi_variable数据库表中
 * @author 王晓华
 *
 */
public class ExecutionVariable {

	/**
	 * 流程名称
	 */
	private long executionId;
	
	/**
	 * 参数名称
	 */
	private String name;
	
	/**
	 * 参数值
	 */
	private Object value;
	private byte[] data;
	
	/**
	 * 参数类型
	 */
	private VariableType type;
	
	
	public ExecutionVariable(){}
	
	public ExecutionVariable(String name, Object value, VariableType type, long executionId) {
		this.name = name;
		this.data = JdkObjectSerializableUtils.getObjectByte(value);
		this.value = value.toString();
		this.type = type;
		this.executionId = executionId;
	}

	public long getExecutionId() {
		return executionId;
	}

	public void setExecutionId(long executionId) {
		this.executionId = executionId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Object getValue() {
		return value;
	}

	public void setValue(Object value) {
		this.value = value;
	}

	public VariableType getType() {
		return type;
	}

	public void setType(VariableType type) {
		this.type = type;
	}

	public byte[] getData() {
		return data;
	}

	public void setData(byte[] data) {
		this.data = data;
	}
	
}
